<!-- 头部封面以及用户信息样式 -->
<style type="text/css">
body, button, input, select, textarea {font: 12px/1.125 Arial,Helvetica,sans-serif;}
.profile-title {margin: 0 0 10px 0;height: 299px;border-bottom: 1px solid #e1e1e1}
.profile_pic_top {height: 300px;position: relative;background-position: center bottom;background-repeat: no-repeat;}
.profile_pic_top .pf_badge_icon {position: absolute;bottom: 10px;right: 20px;opacity: 0.7;}
.profile_pic_top .pf_badge {float: right;display: inline;}
.S_line1 {border-color: #e0dbd1;}
.profile_pic_top .badge_list {padding-left: 5px;}
.profile_pic_top .badge_list li {float: left;display: inline;margin: 0 0 0 7px;}
.profile_top {position: relative;padding-bottom: 15px;}
.SW_fun_btn:hover, .S_bg5 {background-color: #ffffff; box-shadow: 0 0 5px #CCCCCC;}
.profile_top .pf_info{margin-left: 225px;line-height: 22px;padding-top: 10px;position: relative;}
.profile_top .pf_head {position: absolute;top: -108px;left: 20px;box-shadow: 0 2px 4px rgba(0,0,0,0.3);border-width: 1px;border-style: solid;}
.S_bg4{background-color: #fafafa;}
.profile_top .pf_head_pic {padding: 2px;width: 180px;height: 180px;position: relative;}
.S_line1 {border-color: #e0dbd1;}
.profile_top .pf_head_pic img {display: block;}
.profile_top .pf_head_pic .change_btn_div {position: absolute;text-align: right;right: 12px;bottom: 12px;}
.W_btn_c, .W_btn_c span {cursor: pointer;color: #333;}
.profile_top .pf_head .user_atten {margin: 5px 0 4px 0;border: 0;padding: 0;line-height: 1.125;width: 184px;}
.profile_top .pf_head .user_atten li {padding: 0 3px 3px;float: left;border-right-width: 1px;border-right-style: solid;text-align: center;width: 53px;}
.profile_top .pf_head .user_atten li a {display: block;text-decoration:none;}
.profile_top .pf_head .user_atten_l li strong {font-size: 20px;}
.profile_top .pf_head .user_atten li strong {line-height: 20px;display: block;margin-bottom: 5px;font-family: Tahoma;font-weight: 400;}
.S_func1{color: #3e1e1e;}
.profile_top .pf_head .user_atten li {text-align: center;}
.profile_top .pf_head .user_atten .follower {width: 64px;padding: 0 0 3px 0;}
.profile_top .pf_head .user_atten li {padding: 0 3px 3px;float: left;border-right-width: 1px;border-right-style: solid;text-align: center;width: 53px;}
.profile_top .pf_head .user_atten li.W_no_border {border: 0;}
.profile_top .pf_head_pic .change_btn_div {position: absolute;text-align: right;right: 12px;bottom: 12px;}
.W_btn_c {background-position: 0 -360px;display: inline-block;background: url("image/change.jpg") no-repeat;padding: 0 0 0 2px;height: 22px;line-height: 21px;}
.W_btn_c, .W_btn_c span {min-width: 27px;text-align: center;padding: 0 9px 0 8px;white-space: nowrap;cursor: pointer;color: #333;}
.profile-title .person-info-t {margin: 0;padding: 0;width: 490px;border-right: 1px solid #e1e1e1}
.profile-title .person-info-t dd {margin-left: 20px;}
.profile-title .person-info-b {position: absolute;right: 20px;top: 20px;background: #fff;width: 230px;}
.pf_verified{text-align: left;}
.pf_verified_info{margin-top: 10px;text-align: left;font-size: 14px;}
.profile-title .person-info-t .tag-lists {height: 17px;overflow: hidden;white-space: normal;}
.more-box {position: relative;float: left;margin-top: 15px;}
.left {float: left;margin-top: 10px;}
.profile-title .person-info {margin: 0 0 20px 180px;padding: 20px 20px 0 20px;position: relative;min-height: 120px;}
.feed-search .ico-search {position: absolute;top: -5px;right: 5px;}

/*勋章*/
.person-info .person-info-b li {float: left;font-size: 14px;text-align: center;width: 30px;border-right: none;}
.my-medal-list li {float: left;margin: 20px 10px 10px 0;}
.arrow-next-page, a:hover .arrow-next-page {background-position: -58px 0;width: 30px;height: 30px;cursor: pointer;margin: 22px 0 0 0;}
.ts_confirm {clear: left;margin: 0;margin-top: -200px;margin-left: -220px;position: absolute;z-index: 9;text-align: center;background: url(../image/pagedarkbg.png) repeat 0 0;}
</style>


<div id="pl_profile_cover">
    <php>if(empty($userStyle)){</php>
    <div class="S_profile_pic profile_pic_top" node-type="cover" style="background-image:url(addons/plugin/UserStyle/themes/front/011.jpg)" id="front_covor">
    <php>}else{</php>
    <div class="S_profile_pic profile_pic_top" node-type="cover" style="{$userStyle.background}" id="front_covor">
    <php>}</php>
        <php>if($mid == $uid){</php>
        <a href="javascript:void(0);" class="templete_center" onclick="hShowBox();" title="模板偏好设置">       
        <div class="templete_enter">        
        </div>
        </a>
        <php>}</php>
        <!-- 封面设置弹出框样式 -->
        <div id="change_style_box" style="display: none;">
            <style type="text/css">

            .changestylepop {background: #fff;width: 730px;position: absolute;z-index: 998;right: 0px;top: 0;overflow: hidden;border: 1px #bbb solid;padding: 0px;box-shadow: 0 0 5px #888;-webkit-box-shadow: 0 0 15px #888;-khmtl-box-shadow: 0 0 15px #888;-zom-box-shadow: 0 0 15px #888;}
            .D2{width:100%;height:100%;position:absolute;top:0;left:0;z-index:99}.D2 .DCont.D2 .bg{background:#FFF;position:absolute;top:0;left:0;width:100%;height:100%;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;-height:expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px")}.D2 iframe.cover_select{width:100%;height:100%;position:absolute;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;z-index:-1;display:none;-display:}.D2 .DLoad{filter:alpha(opacity=50);-moz-opacity:0.5;opacity:0.5;position:absolute;z-index:5;background:url(http://mat1.gtimg.com/www/mb/images/loading.gif) #FFF 50% 50% no-repeat;}.D2 .CR{position:absolute;top:50%;left:50%;margin:0 0 0 -9999px}.D2 .DTitle,.D2 .ico_skin,.DtabTitle,.ico_lock,.D2 .funBoxx,.themebg_sel button,.themebg .del,.bgPosition,.bgPosition a.select,.D2 .color,.palettes .mask,.themeDiy .pages a{background:url(http://mat1.gtimg.com/www/mb/images/skinBg1d.png) no-repeat}.D2 .DTitle{cursor:move;height:36px;overflow:hidden;padding-left:10px;font-family:Simsun;font-size:14px;line-height:35px;font-weight:bold;border-bottom:1px solid #D5D5D5;background-position:0 -34px;background-repeat:repeat-x}.D2 .ico_skin{float:left;margin:9px 5px 0 0;_margin-right:0;background-position:0 -124px}.D2 .close{position:absolute;float:none;top:12px;right:12px;margin:0}.D2 .DWrap{width:586px;padding:1px;border:1px solid #7B828B;background:#fff;filter:progid:DXImageTransform.Microsoft.Shadow(color="#909090",Direction=135,Strength=4);-moz-box-shadow:2px 2px 5px #909090;-webkit-box-shadow:2px 2px 5px #909090}.D2 .pages{width:544px;margin:0 auto;padding:10px 5px 8px;border-bottom:1px dotted #C9C9C9}.D2 .pages .disabled{color:#999;cursor:default;text-decoration:none;background:none}
            .funBoxx{text-align:center;background-position:0 -75px;background-repeat:repeat-x}.funBoxx .btn-cancel span{padding:5px 12px;_margin:-1px 0 0 0;_height:15px;}.D2 .btn_save{margin-right:10px}.DtabTitle{height:29px;padding-right:10px;*zoom:1;overflow:hidden;line-height:29px;background-repeat:repeat-x;position:relative;}.DtabTitle .ico-close{position:absolute;right:10px;top:6px;}.DtabTitle ul{float:left}.DtabTitle li{display:inline-block;float:left;margin-left:-1px;border:1px solid #D5D5D5;border-width:0 1px}.DtabTitle li.select{padding:0 15px;background:#fff}.DtabTitle li a{display:block;padding:0 15px}.DtempList{width:556px;height:188px;margin:10px 0 0 20px}.DtempList li{position:relative;float:left;width:129px;height:84px;margin:10px 10px 0 0;color:#fff;line-height:19px;text-align:center;cursor:pointer}.DtempList img{margin:1px;width:121px;height:76px;padding:2px;border:1px solid #DFDFDF}
            .DtempList .tempName,.DtempList .mask{position:absolute;z-index:2;left:4px;bottom:4px;width:121px;height:19px}.DtempList .ico_lock{display:none;position:absolute;z-index:2;left:6px;top:6px;width:11px;height:16px;background-position:-20px -125px}.DtempList .mask{z-index:1;background:#000;filter:alpha(opacity:70);opacity:0.7}.DtempList li.hover img{border-color:#32A1CC}.DtempList .select img{margin:0;border:2px solid #32A1CC}.DtempList .locked img{border-color:#5F5F5F!important;background:#fff;filter:alpha(opacity:20);opacity:0.2}.DtempList .locked .ico_lock{display:block}.themeDiy{width:670px;height:213px;margin:20px auto 0;color:#999;}.themebgWrap{float:right;width:283px;height:203px;border:1px solid #DFDFDF;}.themebg_sel{position:relative;height:49px;padding:10px 8px 0;line-height:25px;background:#EBEBEB}.themebg_sel .inputTxt{width:180px;margin-right:5px;border:1px solid #C5C5C5;position:relative;z-index:1;cursor:pointer}.themebg_sel button{width:60px;height:21px;border:0;background-position:0 -145px}.selfilemask{position:absolute;z-index:100;width:20px;height:20px;overflow:hidden;*zoom:1;filter:alpha(opacity:0);opacity:0}.selfilemask input{position:absolute;right:0;height:21px;cursor:pointer}
            .themebg_set{;margin:15px auto 0;padding:0 0 0 10px;}.themebg{float:left;position:relative;width:275px;height:83px;padding:2px;border:2px solid #32A1CC;overflow:hidden}.themebg .nobg{cursor:default;height:83px;color:#999;line-height:40px;text-align:center;background-color:#EFEFEF}.themebg .loading{padding-left:16px;background-position:20% 50%}.themebg .imgbg{width:250px;text-align:center;overflow:hidden}.themebg .imgbg img{height:60px;width: 250px;}.themebg .del{position:absolute;top:0;right:0;width:18px;height:18px;background-position:-35px -124px}.bgSetting{float:right;padding-top:38px;}.bgPosition{width:150px;height:22px;margin:5px 0;background-position:0 -168px;*margin:3px 0;}.bgPosition a{display:inline-block;width:35px;height:19px;padding-top:1px;margin:1px;color:#333;line-height:19px;text-align:center; vertical-align:middle;_margin:0 0 0 1px;_width:34px;}*+html .bgPosition a{margin:1px 0 0 1px;width:34px;}.bgPosition a:hover{text-decoration:none;background-color:#fdfdfd;color:#333;}.bgPosition a.select,.bgPosition a.select:hover{color:#fff;background-position:-64px -145px}.bgSetting label{margin-right:5px;white-space:nowrap;*margin:0;_margin-right:3px;}.bgSetting label input{vertical-align:-2px;margin:0 3px 0 0;*margin:0 0 0 -3px;_vertical-align:-1px;}.themecolorWrap{position:relative;min-height:203px;height:205px;width:680px;float:left;border:1px solid #DFDFDF;overflow-y:scroll;}.themePreview{margin:20px 0 0 0;}.themecolorWrap h4{height:24px;padding-top:3px}/*.themePreview{float:left;}*/.themePreview a{position:relative;float:left;margin:0 0 5px 5px;border:2px solid #fff;width:100px;height:75px;*z-index:9;}.themePreview a:hover,.themePreview a.current{border:2px solid #000;}.themePreview a img{width:100px;height:75px;}.themePreview a span{position:absolute;background:#000;font-weight:normal;color:#fff;width:100px;height:22px;line-height:22px;text-align:center;display:block;bottom:0;left:0;opacity:0.4;filter:alpha(opacity=40);-moz-opacity:0.4;_bottom:-1px;}.D2 .colorBox{height:29px;padding-left:1px}.D2 .color{display:inline-block;width:16px;height:16px;padding:3px;background-position:0 -192px}.D2 .colorBox .select{position:relative;background-position:-24px -192px}.TpreviewBox{width:112px;height:110px;overflow:hidden;*zoom:1;padding:10px;border:1px solid #DFDFDF}.Tmain,.Tface{background:#fff url(http://mat1.gtimg.com/www/mb/images/skinFixmod.png) no-repeat}.Tmain{float:left;width:77px;height:110px;margin-right:-1px}.Tside{float:right;width:34px;height:110px;}.TUIn{width:28px;padding:6px 3px 2px;overflow:hidden;*zoom:1}.Tface{float:left;width:14px;height:14px;margin-bottom:4px;background-position:-81px 0}.Tnums{float:right;width:12px}.Tside .textColor{width:12px;height:3px;overflow:hidden;margin-bottom:1px;background:#9C000D}.Tside .linkColor{clear:both;width:50%;height:2px;overflow:hidden;margin-bottom:2px;background:#FFA869}.Tside .sepLine{height:0;overflow:hidden;border:1px solid;border-width:1px 0}.TsideMod{width:28px;margin:4px auto}.TsideMod .textColor{margin-bottom:3px}.TsideMod .linkColor{width:16px}.ThotList .SA{z-index:0;left:0;top:-5px;*top:-6px;_top:-5px}.ThotList .SA *{width:18px;height:5px}.ThotList .SA span{left:0;top:1px}.ThotList{margin-top:3px;height:12px}.palettelist{float:right;position:relative;width:108px;overflow:hidden}.paletteWrap{height:142px;width:1000px;overflow:hidden}.paletteWrap li{float:left;width:108px}.palettes,.palettes *{display:block;height:27px;overflow:hidden;}.palettes{position:relative;float:left;width:48px;padding:3px;margin:4px 0 10px;cursor:pointer}.palettes .c{float:left;width:8px}.palettes .mask{position:absolute;top:0;left:0;clear:both;width:54px;height:33px;background-position:0 -218px}.paletteWrap .select .mask{background-position:-56px -218px}.D2 .themeDiy .pages{position:absolute;right:4px;bottom:15px;clear:both;width:108px;height:16px;overflow:hidden;padding:0;border:none}.themeDiy .pages *{float:left;margin:0}.themeDiy .pages a{width:20px;height:16px;background-position:-74px -124px}.themeDiy .pages .btn_prev_disabled{background-position:-59px -124px;cursor:default}.themeDiy .pages .btn_next{background-position:-102px -124px}.themeDiy .pages .btn_next_disabled{background-position:-87px -124px;cursor:default}.themeDiy .pageInfo{width:68px;text-align:center}.themeHisWrap{position:absolute;left:15px;bottom:13px;*bottom:17px;height:24px;overflow:hidden;*zoom:1;line-height:25px}.themeHis{float:left;width:16px;height:16px;padding:2px;margin:1px 2px;overflow:hidden;border:1px solid #DFDFDF;background-position:center top;cursor:pointer}.themeHis .Tmain{filter:alpha(opacity=10);opacity:0.1;width:9px;height:16px;background:#fff}.themeHis .Tside{width:6px;height:16px}.themeHisWrap .select{margin:0 1px;border:2px solid #32A1CC}.colorPickerPosition{position:absolute;height:0;margin:-31px 0 0 -222px}
            .themePreview a.current {border: 2px solid #000;}
            </style>

<div class="changestylepop">
     <div class="DWrap">
        <div class="DLoad" style="width: 586px; height: 308px; display: none; "></div>
        <div class="DCont" style="">
            <div class="DtabTitle">
                <a href="javascript:;" onclick="hCancel();" class="ico-close right"></a>
                <ul>
                    <li class="select"><b>个人封面设置</b></li>
                </ul>
                <span class="right"></span>
            </div>
            <div class="themeDiy" style="display:block;">
                <div class="themecolorWrap">
                    <div class="colorPickerPosition"></div>
                    <div class="themecolor">
                        <div class="themePreview">
                            <div class="colorBox ">
                                <!-- 系统封面 -->
                                <volist name="homeStyle" id="hs">
                                    <a rel="{$key}" href="javascript:;" onclick="hChange('{$key}',$(this));" class=''>
                                        <img src="{$hs.thumb_url}" alt="{$hs.name}">
                                        <span>{$hs.name}</span>
                                    </a>
                                </volist>
                                
                            </div>
                            <div class="TpreviewBox" style=" float:left; margin-left:60px; display:none;"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="funBoxx">
                <a class="btn-green-small buttonObj" onclick="hSave();" style="margin: 10px;"><span>保存</span></a>
                <a class="btn-green-small buttonObj" onclick="hDefault()" style="margin: 10px;padding:0 5px"><span>恢复默认</span></a>
                <a class="btn-cancel buttonObj" onclick="hCancel();" href="javascript:;" style="margin: 10px;"><span>取消</span></a>                
            </div>
        </div>
    </div>
</div>
</div>
    </div>
</div>

<div id="plc_profile_header">
    <div class="profile_top S_bg5">
        <div class="pf_head S_bg4 S_line1">
        <div id="pl_profile_photo">
            <div class="pf_head_pic" onmouseover="this.getElementsByTagName('div')[0].style.display=''" onmouseout="this.getElementsByTagName('div')[0].style.display='none';">
                <a href="{:U('public/Account/avatar')}" title="点击修改头像">
                <img src="{$user_info[$uid]['avatar_big']}" height="180" width="180" alt="{$user_info[$uid]['uname']}">
                </a>
            </div>
            <ul class="user_atten clearfix user_atten_l">
                <li class="S_line1">
                    <a class="S_func1" href="{:U('public/Profile/following',array('uid'=>$user_info[$uid]['uid']))}">
                        <strong node-type="follow">
                            {$userData.following_count|default=0}
                        </strong>
                        <span>关注 </span>
                    </a>
                </li>
                <li class="follower S_line1">
                    <a class="S_func1" href="{:U('public/Profile/follower',array('uid'=>$user_info[$uid]['uid']))}">
                        <strong node-type="fans">
                            {$userData.follower_count|default=0}
                        </strong>
                        <span>粉丝</span>
                    </a>
                </li>
                <li class="W_no_border">
                    <a class="S_func1" name="profile_tab" href="{:U('public/Profile/index',array('type'=>$type,'feed_type'=>'','uid'=>$uid))}">
                        <strong node-type="weibo">
                            {$userData.weibo_count|default=0}
                        </strong>
                        <span>微博</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>


    <div class="person-info clearfix">
    <dl class="person-info-t clearfix">
        <dd>
            <div class="name">
                <strong><a href="{:U('public/Profile/index', array('uid'=>$uid))}">{$user_info[$uid]['uname']}</a></strong>
                <div class="person-icon"><volist name="userGroupData[$user_info[$uid]['uid']]" id="vo">
                <img style="width:auto;height:auto;display:inline;cursor:pointer;vertical-align:-2px;" src="{$vo['user_group_icon_url']}" title="{$vo['user_group_name']}" />&nbsp;
                </volist>
                <a href="{:U('public/Index/scoredetail')}" target="_blank"><img style="width:auto;height:auto;display:inline;cursor:pointer;vertical-align:0;" src="{$userCredit.level.src}" event-node='ico_level_right' /></a></div>

            </div>
            
            <div class="grade"><if condition="$user_info[$uid]['sex'] eq 1"><i class="ico-male"></i><else /><i class="ico-female"></i></if>&nbsp;{$user_info[$uid]['location']}</div>
            <php>if(!empty($user_info[$uid]['intro'])){</php>
                <div class="grade">个人简介：{$user_info[$uid]['intro']|getShort=100}</div>
            <php>}</php>
            <php>if($sidebar['user_tag'][$uid]){</php>
                <div class="grade tag-lists">
                        个人标签：
                        <volist name="sidebar['user_tag'][$uid]" id="u_t_v">
                            <a href="{:U('public/Search/index',array('t'=>3,'a'=>'public','k'=>$u_t_v))}">{$u_t_v}</a>&nbsp;&nbsp;
                        </volist>
                    
                </div>
            <php>}</php>
            
            <div><p class="left">
                <php>if($mid != $user_info[$uid]['uid'] && $mid){</php>
                    {:W('FollowBtn', array('fid'=>$user_info[$uid]['uid'], 'uname'=>$user_info[$uid]['uname'], 'follow_state'=>$follow_state[$user_info[$uid]['uid']], 'isrefresh'=>1))}
                    <php>if(CheckPermission('core_normal','send_message')){</php>
                    <eq name='userPrivacy.message' value='0'>
                    <a onclick="ui.sendmessage({$user_info[$uid]['uid']}, 0)" href="javascript:void(0)" event-node="postMsg" class="ml5 btn-cancel"><span>发私信</span></a>
                    </eq>&nbsp;
                    <php>}</php>
                    <div class="more-box"><span class="ml5"><a href="javascript:;" event-node="more_operation" class="ml5">更多</a></span>
                    <div id="more_operation" class="layer-list more-drop" style="display:none;">    
                        <ul onmouseover="$('#more_operation').show();" onmouseout="$('#more_operation').hide()">
                            <li id="blacklist">
                                {:W('Blacklist',array('tpl'=>'btn', 'fid'=>$user_info[$uid]['uid'], 'isrefresh'=>1))}
                            </li>
                            <php>if($follow_state[$user_info[$uid]['uid']]['following'] == 1){
                            </php>
                                <li><a href="javascript:void(0)" onclick="setFollowGroup({$user_info[$uid]['uid']}, 1)">设置分组</a></li>
                            <php>}</php>
                        </ul>
                    </div></div>

                <php>}</php>
            </p></div>
            
        </dd>       
    </dl>
    <php>if($sidebar['verifyInfo']){</php>
    <div class="person-info-b clearfix">
        <div class="pf_verified">
            <img src="__THEME__/image/authentication.png" />
        </div>
        <div class="pf_verified_info">
            {$sidebar['verifyInfo']}
        </div>
        {:W('MedalList',array('uid'=>$user_info[$uid]['uid']))}
    </div>   
    <php>}else{</php>
    <div class="person-info-b clearfix">
    {:W('MedalList',array('uid'=>$user_info[$uid]['uid']))}
    </div>
    <php>}</php>

<link href="addons/plugin/UserStyle/css/cutImage.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="addons/plugin/UserStyle/js/cutImage.js"></script>
<script type="text/javascript">
// 事件监听
M.addEventFns({
    ico_level_right: {
        load: function() {
            var offset = $(this).offset();
            var top = offset.top + 23;
            var left = offset.left - 10;
            var html = '<div id="layer_level_right" class="layer-open experience" style="display:none;position:absolute;top:'+top+'px;left:'+left+'px;">\
                        <dl>\
                        <dd>{:L('PUBLIC_USER_LEVEL')}：{$userCredit.level.name}</dd>\
                        <dd>{:L('PUBLIC_USER_POINTS_CALCULATION',array('num'=>$userCredit['credit']['experience']['value'],'experience'=>$userCredit['creditType'][$userCredit['level']['level_type']]))}</dd>\
                        <dd class="textb">{:L('PUBLI_USER_UPGRADE_TIPS',array('num'=>$userCredit['level']['nextNeed'],'experience'=>$userCredit['creditType'][$userCredit['level']['level_type']]))}</dd>\
                        </dl>\
                        </div>';
            $("body").append(html);

            this._model = document.getElementById("layer_level_right");
        },
        mouseenter: function() {
            $(this._model).css('display', 'block');
        },
        mouseleave: function() {
            $(this._model).css('display', 'none');
        }
    },
    ico_wallet_right: {
        load: function() {
            var offset = $(this).offset();
            var top = offset.top + 23;
            var left = offset.left - 20;
            var html = '<div id="layer_wallet_right" class="layer-open scale" style="display:none;position:absolute;top:'+top+'px;left:'+left+'px;">\
                        <dl>\
                        <dt></dt>\
                        <dd>{:L('PUBLIC_USER_POINTS_CALCULATION',array('num'=>intval($userCredit['credit']['score']['value']),'experience'=>$userCredit['creditType']['score']))}</dd>\
                        </dl>\
                        </div>';
            $("body").append(html);
            this._model = document.getElementById("layer_wallet_right");
        },
        mouseenter: function() {
            $(this._model).css('display', 'block');
        },
        mouseleave: function() {
            $(this._model).css('display', 'none');
        }
    },
    more_operation: {
        load: function() {
            var offset = $(this).offset();
            $('#more_operation').css({'left': 8 + 'px','top': 13 + 'px','padding-top': 0 + 'px', 'position':'absolute', 'width':'85px', 'z-index':5});
        },
        click: function() {
            if($('#more_operation').css('display') == 'none') {
                $('#more_operation').css('display', '');
            } else {
                $('#more_operation').css('display', 'none');
            }
            $('body').bind('click', function(event) {
                if($(event.target).attr('event-node') != 'more_operation' && $(event.target).attr('id') != 'blacklist') {
                    setTimeout("$('#more_operation').css('display', 'none')",500);
                }
            });
        }
    }
}); 
</script>

<script type="text/javascript">
var oldValue = $('#front_covor').attr('style');
var homeStyle = <?php echo json_encode($homeStyle); ?>;

// 图片切换
function hShowBox(){
    $('#change_style_box').show();
}
// 取消操作
function hCancel(){
    $('#change_style_box').hide();
    var newValue = $('#front_covor').attr('style');
    if(newValue != oldValue){
        window.location.href = window.location.href;
    }
}
// 选中预览
function hChange(id,obj){
    for(var one in homeStyle) {
        if(one == id) {
            obj.addClass('current');
        } else {
            $('a[rel="'+one+'"]').removeClass('current');
        }
    }
    if(id in homeStyle){
        $('#nobg').show();   
        $('#loading,#showImg').hide();
        $('input[name=\'pic\']').val('');
        $('#front_covor').attr('style',"background-image:url(addons/plugin/UserStyle/themes/front/"+id+".jpg);");
    }    
}
// 恢复默认
function hDefault(){
    $('#front_covor').attr('style',"background-image:url(addons/plugin/UserStyle/themes/front/011.jpg);");
    var thumb_url = $('#front_covor').attr('style');
    $.post("<?php echo Addons::createAddonUrl('UserStyle','userStyleSave'); ?>",{thumb_url:thumb_url},function(res){
        if(res == 1){
            $('#change_style_box').hide();
            ui.success('设置成功');
        }
    });
}
// 保存
function hSave(){
    // 当前封面图地址  
    var thumb_url = $('#front_covor').attr('style');
    // 去除IE自动添加的双引号
    var reg = new RegExp('"',"g");  
    thumb_url = thumb_url.replace(reg, "");    
    // 保存系统封面
    if(thumb_url != oldValue){
        var operate = 0;
        $.post("<?php echo Addons::createAddonUrl('UserStyle','userStyleSave'); ?>",{thumb_url:thumb_url},function(res){
            if(res == 1){
                $('#change_style_box').hide();
                ui.success('设置成功！');
            }else{
                ui.error('操作失败！');
                window.location.href = window.location.href;
            }
        });
    }else{
        $('#change_style_box').hide();
        ui.success('封面图片未变动');
    }
}
</script>